package com.zjitc.controller;

import com.zjitc.dao.UserDao;
import com.zjitc.model.User;
import com.zjitc.service.UserService;
import com.zjitc.service.impl.UserServiceImpl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import redis.clients.jedis.Jedis;

/**
 * Create by IntelliJ IDEA
 *
 * @author: jsonor
 * @date-Time: 2018/4/17 15:12
 * @description:
 */
@Controller
@RequestMapping("/user")
public class UserController {

  @Autowired
  private Jedis jedis;

  @Autowired
  private UserService userService;

  private static List<User> userList;

  @RequestMapping("/register")
  public String register(
      @RequestParam("username")String username,
      @RequestParam("password")String password,
      @RequestParam("name")String name,
      @RequestParam("email")String email,
      @RequestParam("phone")String phone,
      @RequestParam("addr")String addr){
        User user=new User();
        user.setUsername(username);
        user.setPassword(password);
        user.setName(name);
        user.setEmail(email);
        return "login";
  }
}
